<LINK type="text/css" HREF="style.css" rel="stylesheet">
<h1>roman2num</h1>
<p>Converts a roman number string into an integer number, if the string meets these rules:</p>
<h3>Rule 1 - Repetition</h3>
<p>A single letter may be repeated up to three times consecutively with  each occurrence of the value being additive. This means that I is one,  II means two and III is three. However, IIII is incorrect for four. </p>
<h3>Rule 2 - Additive Combination</h3>
<p>Larger numerals must be placed to the left of the smaller numerals  to continue the additive combination. So VI equals six and MDCLXI is  1,661.</p>
<h3>Rule 3 - Subtractive Combination</h3>
<p>A small-value numeral may be placed to the left of a larger value.  Where this occurs, for example IX, the smaller numeral is subtracted  from the larger. This means that IX is nine and IV is four. The  subtracted digit must be at least one tenth of the value of the larger  numeral and must be either I, X or C. Accordingly, ninety-nine is not  IC but rather XCIX. The XC part represents ninety and the IX adds the  nine. In addition, once a value has been subtracted from another, no  further numeral or pair may match or exceed the subtracted value. This  disallows values such as MCMD or CMC.</p>
<h3>Rule 4 - Repeated Use of V, L and D</h3>
<p>The numerals that represent numbers beginning with a '5' (V, L and  D) may only appear once in each Roman numeral. This rule permits XVI  but not VIV.</p>
<h3>Rule 5 - Reducing Values</h3>
<p>The fourth rule compares the size of value of each the numeral as  read from left to right. The value must never increase from one letter  to the next. Where there is a subtractive numeral, this rule applies to  the combined value of the two numerals involved in the subtraction when  compared to the previous letter. This means that XIX is acceptable but  XIM and IIV are not.</p>
<h3>Rule 6 - Multiplication</h3>
<p>To represent numbers of four thousand or greater, lines are added to  each letter. For example, a line above a letter multiplies its value by  one thousand. To represent 15,015 the Roman numerals are VVVVVV. This rule is not implemented in the algorithm so the code is limited to values up to but not including four thousand.</p>
<h3>Rule 7 - Zero</h3>
<p>There is very little information that suggests that the system  originally had a notation for zero. However, the letter N has been used  to represent zero in a text from around 725AD. This will be used in the  algorithm.</p>
<h2>parameters:</h2>
<ol>
  <li>a roman number string </li>
</ol>